package com.gjm.demo.component;

import com.gjm.demo.model.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class StudentComponent {

//    @Bean({"s3", "s4"})
    @Bean("s3")
    public Student s1(String name) {
        return new Student(name, 12);
    }

    @Bean
    public Student s2() {
        return new Student("lisi", 14);
    }

    @Bean
    public String name1() {
        return "zhangsan";
    }
}
